<template>
  <div class="page">
    <headNav @headBack="book_reutrn_go" centerTitle=" 订单"></headNav>
    <div class="title fix">
      <div class="titleDate">{{flight.month}}月{{flight.day}}日 {{flight.Sunday}}</div>
      <div class="fix">
        <div class="title1 fix">
          <p class="titleGoDate">
            {{flight.currentCabin.departureTime}}
          </p>
          <p class="titleLineMiddle"></p>
          <p class="titleBackDate">
            {{flight.currentCabin.arrivalTime}}
          </p>
        </div>
        <div class="title2 fix">
          <p class="titleGoCity">
            {{flight.currentList.fromInfo}}
          </p>
          <p class="titleBackCity">
            {{flight.currentList.toInfo}}
          </p>
        </div>
        <div class="title3 fix">
          <p class="titleGoType">
            {{flight.currentList.aircraftInfo.split('|',1).join()}}
          </p>
          <p class="titleLineInfo">
            {{this.flightType}}
          </p>
          <p class="titleBackType" v-if="flight.currentList.mealType">
            <i class="iconfont icon-tangshi"></i>
          </p>
        </div>
      </div>
    </div>
    <div class="title">
      <div class="label fix" @click="travelShow=true">
        <span class="labelT">出行类别</span>
        <p class="input ell" >{{travelTypes[0].itemTxt}}</p>
        <i class="iconfont icon-enter"></i>
      </div>
    </div>
    <div class="title">
      <div class="label fix" @click="popupCostCenterVisible=true">
        <span class="labelT">费用归属</span>
        <p class="input ell" >{{handleCostSelectedVal.name}}</p>
        <i class="iconfont icon-enter"></i>
      </div>
    </div>
    <div class="title">
      <div class="label fix">
        <span class="labelT">出差事由</span>
        <input class="input res" placeholder="请填写出差事由" v-model="$store.state.flight.travelReason"/>
      </div>
    </div>
    <div class="">
      <div class="addP fix">
        <div class="addL">
          <h2>添加/修改乘机人</h2>
          <p>请确保姓名证件填写正确</p>
        </div>
        <div class="addR" @click="popupVisible4 = true">新增乘机人</div>
      </div>
      <div class="line"></div>
      <div class="PInfo fix PInfo-cur"
           v-for="(passengerItem,index) in passengerAll"
           v-show="passengerItem.checked">
        <i @click="toggleCheck(passengerItem,index)"
           class="iconfont icon-shanchu3"></i>
        <span class="name ell">{{passengerItem.name}}</span> <span class="card">{{passengerItem.credentialName}}</span>
        <span class="cardID ell">{{passengerItem.credentialNo}}</span>
        <i class="iconfont icon-icon-1"
           @click="changePageModifyInfo(index)"></i>
      </div>
    </div>
    <div class="title" v-if='insurance_show'>
      <div class="label fix" @click="open_insurance">
        <span class="labelT">保险</span>
        <p class="input ell" >{{iusurance_text}}</p>
        <i class="iconfont icon-enter"></i>
      </div>
    </div>
    <div class="contact">
      <div class="label fix">
        <span class="labelT">联系人</span>
        <input type="text" placeholder="请填写联系人姓名" class="input" v-model="contact.name" maxlength="8">
      </div>
      <div class="line"></div>
      <div class="label fix">
        <span class="labelT">手机号码</span>
        <input type="text" placeholder="请填写联系手机号" class="input" v-model.trim="contact.mobile" maxlength="11">
      </div>
      <div class="line"></div>
      <div class="label fix">
        <span class="labelT">邮箱账号</span>
        <input type="text" placeholder="请填写联系人邮箱" class="input" v-model="contact.email">
      </div>
      <div class="labelChange" @click="onShowPopupRule">
        <i data-v-183f10fd="" class="iconfont icon-guize"></i>
        退改签规则
      </div>
    </div>
    <div class="footer fix isFixed">
      <div class="footerL" @click="togglePrice">
        <div class="price">
          ￥ {{totalPrice+iusumoney_all}}
        </div>
        <div class="priceD">
          <span>明细</span> <i class="iconfont" :class="priceDetail ? 'icon-fold':'icon-unfold'"></i>
        </div>
      </div>
      <div @click="submit" class="footerR">
        去付款
      </div>
    </div>
    <!--退票规则弹框-->
    <div v-transfer-dom>
      <Popup v-model="popupQuitRulesVisible" position="bottom" height="100%" style="background-color: #fff;overflow: hidden">
        <flight-quit-rule @closePopupContent="closePopupContent"
                          :isShowBtn = false
                          :navList="navList"
                          :beforeRefundTime="beforeRefundTime"
                          :beforeRefundMoney="beforeRefundMoney"
                          :beforechangeMoney="beforechangeMoney"
                          :typeNum="typeNum"
                          :isTurnTicket="isTurnTicket"
                          :baggage="baggage"
                          :itemTimeOne="itemTimeOne"
                          :itemTimeTwo="itemTimeTwo"
                          :itemTimeThree="itemTimeThree"
                          :salePrice="salePrice"></flight-quit-rule>
      </Popup>
    </div>
    <!--退改签规则弹窗-->
    <mt-popup v-model="changeShow" style="width: 92%">
      <div class="changePop">
        <div class="changeTitle">
          退改签说明
        </div>
        <div class="changeItem fix">
          <p class="l changeType">退票说明</p>
          <p class="l changeTxt">{{flight.endorseRefundRules.ticketBounceRemark || noRuleTip}}</p>
        </div>
        <div class="changeItem fix">
          <p class="l changeType">改期说明</p>
          <p class="l changeTxt">{{flight.endorseRefundRules.ticketChangeRemark || noRuleTip}}</p>
        </div>
        <div class="changeItem fix">
          <p class="l changeType">签转说明</p>
          <p class="l changeTxt">{{flight.endorseRefundRules.ticketSignChangeRemark || noRuleTip}}</p>
        </div>
      </div>
    </mt-popup>
    <!--选择出差申请-->
    <mt-popup v-model="travelShow" position="bottom" class="travelPop">
      <div v-for="(pop,index) in expenseTravelType.travelTypes" class="popItem" :class="{activePop:pop.selected}"
           @click="popActive(index,1)">
        {{pop.itemTxt}}<i class="iconfont icon-duihao r" v-show="pop.selected"></i>
      </div>
    </mt-popup>
    <!--选择费用归属-->
    <mt-popup v-model="expenseShow" position="bottom" class="expensePop">
      <div v-for="(pop,index) in expenseTravelType.expenseTree" class="popItem" :class="{activePop:pop.selected}"
           @click="popActive(index,2)">
        {{pop.name}}<i class="iconfont icon-duihao r" v-show="pop.selected"></i>
      </div>
    </mt-popup>
    <!--选择乘机人-->
    <mt-popup v-model="popupVisible4" position="bottom" class="mint-popup-4 addPpopup" style="max-height: 50%;overflow-y: scroll;">
      <div class="add fix">
          <div class="add1" @click="update">手动添加</div>
          <div class="add2" @click="addPerson">列表选择</div>
      </div>
      <div class="lineP"></div>
      <div class="peopleList">
        <div class="PInfo fix" v-for="(passengerItem,index) in passengerAll" @click="toggleCheck(passengerItem,index)">
          <span class="check iconfont" :class="{'icon-duihao':passengerItem.checked}"></span>
          <span class="name ell">{{passengerItem.name}}</span> <span
          class="card">{{passengerItem.credentialName}}</span>
          <span class="cardID ell">{{passengerItem.credentialNo}}</span> <i @click.stop="deletePassenger(index)"
                                                                            class="iconfont icon-shanchu3 right-icon"></i>
        </div>
      </div>
    </mt-popup>
    <!--价格明细-->
    <mt-popup v-model="priceDetail" position="bottom" class="mint-popup-4 priceDetail">
      <div class="space">
        {{flight.currentList.flightNo}}
        <span class="cangwei" v-if="flight.currentCabin.grade==='Y'">经济舱</span>
        <span class="cangwei" v-if="flight.currentCabin.grade==='C'">公务舱</span>
        <span class="cangwei" v-if="flight.currentCabin.grade==='F'">头等舱</span>
      </div>
      <div class="lineP"></div>
      <div class="price">
        <p><span class="type">成人票</span><span class="unit">￥{{flight.salePrice}}</span> <span class="count">*{{passengerSelected.length}}人</span>
        </p>
        <p><span class="type">机场建设费</span><span class="unit">￥{{flight.departureTax || 0}}</span> <span class="count">*{{passengerSelected.length}}份</span>
        </p>
        <p><span class="type">燃油附加费</span><span class="unit">￥{{flight.fuelTax || 0}}</span> <span class="count">*{{passengerSelected.length}}份</span>
        </p>
        <p><span class="type">服务费</span><span class="unit">￥{{flight.serverCharge}}</span> <span class="count">*{{passengerSelected.length}}份</span>
        </p>
      </div>
      <div class="iusurance" v-if="iusurance_list.length>0">
        <div class="iusu-heda">保险</div>
        <div v-for="(item,index) in iusurance_list" class="iusu-list" v-if="item.allIusu>0">
          <p>{{item.name}}</p>
          <p>￥{{item.salePrice}}/份x{{item.allIusu}}</p>
        </div>
      </div>
    </mt-popup>
    <confirmOne @confirmOneBtn="confirmOneBtn" :confirmOneInfo="confirmOneInfo" v-show="confirmOneShow"></confirmOne>
    <alert v-show="alertShow" class="hh">
      <div class="shouwan-alert">
        <div>
          <p>{{alertInfo}}</p>
        </div>
        <div class="alert-btn" @click="alertBtnClick">
          确定
        </div>
      </div>
    </alert>
    <alert v-show="alertShow1" class="ll">
      <div class="maneyChange">
        <div>
          <p>由于航空公司价格变动</p>
          <p>当前应付金额: <span style="color: #ce1b1b;">{{totalPrice}}</span></p>
        </div>
        <div class="money-a-btn fix">
          <div class="money-a-cancel" @click="cancelA">重新选择</div>
          <div class="money-a-success" @click="successA">继续预订</div>
        </div>
      </div>
    </alert>
    <!--员工尚未设置职级-->
    <alert v-show="staffRankShow">
      <div class="staffRankShow">
        <div class="staffRankIco"><i class="iconfont icon-gantanhao"></i></div>
        <div class="staffRankInfo">
          <p>该员工尚未设置职级</p>
          <p>请进行设置</p>
        </div>
        <div class="staffRankBtn" @click="staffRankClick">确定</div>
      </div>
    </alert>
    <!--违规不能创单-->
    <alert v-show="alertIllegal2" class="ll">
      <div class="maneyChange">
        <div>
          {{alertInfo}}
        </div>
        <div class="money-a-btn fix">
          <div class="money-a-cancel" @click="cancelA">重新预订</div>
          <div class="money-a-success" @click="orderConflict">取消</div>
        </div>
      </div>
    </alert>
    <!--没有添加乘机人,前往保险页面的提示-->
    <alert v-show="insurance_add" class="ll">
      <div class="maneyChange">
        <div>
          <p>您还没有添加乘机人!</p>
        </div>
        <div class="money-a-btn fix">
          <div class="money-a-cancel" @click="insurance_add=false">返回</div>
          <div class="money-a-success" @click="open_insurance_click">添加</div>
        </div>
      </div>
    </alert>
    <confirm v-show="confirmShow" :confirmInfoL="confirmInfoL" :confirmInfoR="confirmInfoR" @confirmBtnL="confirmBtnL"
             @confirmBtnR="confirmBtnR" :confirmInfo="confirmInfo"></confirm>
    <cost-to-attribution :visible.sync="popupCostCenterVisible"
                         @selected="costCenterFn"></cost-to-attribution>
  </div>
</template>


<script>
  import { Indicator, Toast} from 'mint-ui';
  import headNav from 'components/head.vue';
  import alert1 from 'components/alert.vue'
  import confirmOne from 'components/confirmOne.vue'
  import confirm from 'components/confirm.vue'
  import {copyArr, array_heavy} from 'src/libs/plan.js'
  import { Popup, TransferDomDirective as TransferDom} from 'vux'
  import flightQuitRule from '../../../components/flight/flight-quit-rule.vue'
  export default{
    data(){
      return {
        bookingRuleObj: this.$store.state.flight.bookingInit.detailDto.refundChangeDetail,
        itemTimeOne: '',
        itemTimeTwo: '',
        itemTimeThree: '',
        baggage: 20,
        isTurnTicket: '',
        typeNum: 1,
        beforeRefundTime: [],
        beforeRefundMoney: [],
        beforechangeMoney: [],
        popupQuitRulesVisible: false,
        navList: ['退改详情', '行李说明'],
        popupCostCenterVisible: false,
        costAttributionSelected: [],
        confirmOneShow: false,
        confirmOneInfo: '',
        confirmInfoL: '重新选择航班',
        confirmInfoR: '重新选择舱位',
        changeShow: false,
        titleBackType: '经济舱',
        popupVisible4: false,
        alertIllegal1: false,//违规能下单
        alertIllegal2: false,//违规不能下单
        alertInfo: '',//弹窗提示信息
        travelShow: false,//出差申请
        expenseShow: false,//费用归属
        priceDetail: false,//价格明细
        alertShow: false, // 售完弹窗
        alertShow1: false,//价格变动弹窗
        staffRankShow: false, //员工尚未设置职级
        orderId: "", /*返回的订单ID*/
        iusumoney_all: 0,
        insurance_add: false,
        //这两个后期要用
        isiusumonery: false,
        isiusumoneryalert: false,
        createOrderCode: '',
        confirmShow: false,
        confirmInfo: '',
        confirmCode: '',//判断是那个功能的confirm
        confirmed:false
      }
    },
    directives: {
      TransferDom
    },
    components: {headNav: headNav, alert: alert1, confirmOne: confirmOne, confirm,Popup, flightQuitRule},
    mounted(){
      this.$vux.loading.hide();
      this.$store.state.entryCode = 1;
      /*改变entryCode值*/
      this.$store.state.headNav.back = 'flightListDetail';
      //进入页面就进行计算
      let list = this.$store.state.insurancedata.flight.flightinsurance;
      if (list.length > 0) {
        for (let i = 0; i < list.length; i++) {
          if (list[i].allIusu) {
            this.iusumoney_all += list[i].salePrice * list[i].allIusu;
          }
        }
      } else {
        this.iusumoney_all = 0
      }
      //这断注释不要删
      /*  this.eventBus.$on('illegaLReason', function(data){
       if(data){
       setTimeout(()=>{
       this.submit();
       },3000)
       }
       }.bind(this));*///这种方式类型只适合获取数据,并不适合做下一步操作...因为会在回到当前页面没有加载玩,但是这个方法就执行啦
      if (this.$store.state.illegalReason) {
        this.submit();
        this.$store.state.illegalReason = false;
      }
    },
    methods: {
      closePopupContent() {
        this.popupQuitRulesVisible = false;
        this.popupQuitRulesVisible = false;
      },
      //拿到舱位退改详情信息,展示对应弹框
      onShowPopupRule() {
        let that = this;
        that.popupQuitRulesVisible = true;
        that.typeNum = that.bookingRuleObj.type;
        if(that.typeNum == 1) {
          that.beforechangeMoney = that.bookingRuleObj.changeAmountList;
          that.beforeRefundTime = that.bookingRuleObj.headers;
          that.beforeRefundMoney = that.bookingRuleObj.refundAmountList;
          that.isTurnTicket = that.bookingRuleObj.endorseRule;
        } else if(that.typeNum == 2) {
          that.beforechangeMoney = that.bookingRuleObj.changeAmountList.concat().splice(0, 1);
          that.beforeRefundTime = that.bookingRuleObj.headers.concat().splice(0, 1);
          that.beforeRefundMoney = that.bookingRuleObj.refundAmountList.concat().splice(0, 1);
          that.isTurnTicket = that.bookingRuleObj.endorseRule;
        } else if(that.typeNum == 3) {
          that.itemTimeOne = that.bookingRuleObj.headers[0];
          that.itemTimeTwo = that.bookingRuleObj.headers[1];
          that.itemTimeThree = that.bookingRuleObj.headers[2];
        }
        that.baggage  = parseInt(that.bookingRuleObj.baggage.replace(/[^0-9]/ig,"") );
      },
      // 费用归属选中类型
      costCenterFn (item) {
        this.costAttributionSelected = item
      },
      toggleCheck2(passenger, type, event) {
        if (event) {
          event.stopPropagation()
        }
        if (type == 'all' && passenger.credentialName != '护照' && passenger.credentialName != '身份证' && passenger.credentialName != '台湾通行证' && passenger.credentialName != '港澳通行证') { //在近期行程人里勾选
          this.$vux.toast.show({
            type: 'text',
            text: '火车下单不支持该证件类型',
            time: 2000
          })
          return
        }
        return passenger.checked = !passenger.checked
      },
      //修改添加的乘客信息
      changePageModifyInfo(index) {
        var currentPassenger = this.passengerAll[index];
        //如果当前的乘客信息里面没有当前的userId,则是手动添加的乘客
          this.$router.push({
            name: 'addPassenger',
            query: {
              index: index
            }
          });
      },
      confirmBtnL(){
        if (this.createOrderCode == '7') {
          this.$router.replace({
            name: 'flightList'
          })
        }
        if (this.confirmCode == '价格变动') {
          this.$router.replace({
            name: 'flightList'
          })
        }
        this.confirmShow = false;

      },
      createdOrder() {
        var that = this;
        var travelReason = this.$store.state.flight.travelReason;
        var orderForm = {travelReason};
        var searchDto = this.$store.state.flight.searchDto;
        var costCenter = this.handleCostSelectedVal;
        var expenseShow = {
          orgId:costCenter.orgId,
          corporationId:costCenter.corporationId,
          costUnitCode:costCenter.costUnitCode,
          selected:costCenter.selected
        };
        var passengerSelected = [];
        var flightForm = this.flight.flightForm;
        for (var p = 0; p < this.passengerSelected.length; p++) {
          var ob = {};
          ob.name = this.passengerSelected[p].name;
          ob.userId = this.passengerSelected[p].userId;
          ob.credentialType = this.passengerSelected[p].credentialType;
          ob.passengerType = this.passengerSelected[p].passengerType;
          ob.credentialNo = this.passengerSelected[p].credentialNo;
          ob.appIsChecked = this.passengerSelected[p].checked;
          ob.travellerType = this.passengerSelected[p].travellerType;
          ob.isPassEmpLevel = this.passengerSelected[p].isPassEmpLevel;
          ob.empLevelCode = this.passengerSelected[p].empLevelCode;
          ob.gender = this.passengerSelected[p].sexType;
          ob.birthday = this.passengerSelected[p].birthday;
          //保险的字段
          ob.insuranceIds = this.passengerSelected[p].iusuList || [];
          passengerSelected.push(ob)
        }
        orderForm.contactorDto = this.contact;
        orderForm.passengerShow = passengerSelected;
        orderForm.flightForm = JSON.parse(JSON.stringify(flightForm));
        orderForm.flightForm.flightShowDetail = null;
        orderForm.travelTypesForm = this.travelTypes[0];
        orderForm.expenseShow = expenseShow;

        orderForm.agreementPolicyId = searchDto.agreementPolicyId;
        orderForm.productType = searchDto.productType;

        //var illegalReasonListLength = this.$store.state.illegalReasonList.length;
        orderForm.searchDto = searchDto;
        orderForm.illegalReasonList = that.$store.state.illegalReasonList;
        orderForm.illegalPass = that.$store.state.illegalPass;
        that.$vux.loading.show({
          text: '订单创建中...'
        })
        that.$flight.createOrder(orderForm, function(data){
          console.log(data)
          that.confirmShow = false;
          that.$vux.loading.hide();
          var code = data.response.code || '';
          switch (code) {
            case '0':
              that.deleteDate();
              that.$store.state.pay.back = 'booking';
              that.$router.push({
                name: 'pay',
                query:{
                  orderId:data.orderId
                }
              });
              break;
            case '1':
              that.alertShow = true;
              that.alertInfo = data.response.msg;
              break;
            case '-1':
              that.alertShow = true;
              that.alertInfo = data.response.msg;
              break;
            case '5':
              /*重复订单*/
              that.confirmOneInfo = data.response.msg;
              that.confirmOneShow = true;
              break;
            case '7':
              that.createOrderCode = '7';
              that.confirmInfo = data.response.msg;
              that.confirmShow = true;
            case '005':/*未设置职级*/
              that.$store.state.staffList = '';
              that.$router.push({
                name: 'setStaffRank'
              });
              break;
            case '006':/*违规无法创建订单*/
              that.alertIllegal2 = true;
              that.alertInfo = data.response.msg;
              break;
            case '007':/*违规可以创建订单*/
              that.$store.state.illegalData = data.response.data;//展示的违规人员信息
              that.$router.push({
                name: 'illegalReason'
              });
              break;
          }
        },function(){
          that.$vux.loading.hide();
          that.confirmShow = false;
          that.$vux.toast.show({
            type: 'text',
            text: '订单创建失败,请联系管理员',
            time: 2000
          })
        });
      },
      confirmBtnR(){
        this.createdOrder();
      },
      open_insurance_click(){
        this.insurance_add = false;
        this.popupVisible4 = true;
      },
      //打开添加保险页面
      open_insurance(){
        this.$store.state.headNav.back = 'booking';
        let list = this.passengerSelected;

        if (list.length <= 0) {
          this.insurance_add = true;
        } else {
          for (let i = 0; i < list.length; i++) {
            if (list[i].iusuList) {
              list[i].iusuList = ''
            } else {
              list[i].iusuList = ''
            }
          }
          this.$router.push({
            name: 'insurance',
            query: {
              type: 1,
              code: 'flight',
              scene: 'ow'
            }
          })
        }
      },
      //反回按钮
      book_reutrn_go(){
        //清空脏数据
        this.$store.state.insurancedata.flight.flightinsurance = [];
        for (let i = 0; i < this.$store.state.passengerSelected.length; i++) {
          if (this.$store.state.passengerSelected[i].iusuList) {
            delete this.$store.state.passengerSelected[i].iusuList;
          }
        }
        this.$router.go(-1);
      },
      confirmOneBtn(){
        this.confirmOneShow = false
      },
      //员工尚未设置职级
      staffRankClick(){
        this.$router.push({
          name: 'setStaffRank'
        })
      },
      /*订单冲突弹窗按钮*/
      orderConflict(){
        this.alertIllegal2 = false;
      },
      addPerson(){
        // 增加乘机人  列表选择
        this.popupVisible4 = false;
        var that = this;
        that.$vux.loading.show({
          text: '加载中...'
        })
        //增加乘机人 列表选择 从部门列表中选择拿到数据
        that.$flight.flightGetPersonalInfo({
          Id: ''
        }, (res) => {
          that.$vux.loading.hide();
          that.$store.state.staffList.res = res;
          that.$router.push({
            name: 'staffList',
            params: {}
          });
        }, (err) => {
          that.$vux.loading.hide();
          $flightTools.errorToIndex(that);
        });
      },
      // 价格变动弹窗  取消按钮
      cancelA(){
        this.alertShow1 = false;
        this.alertIllegal2 = false;
        this.$router.go(-2);//去列表页
      },
      //价格变动弹窗  确认按钮
      successA(){
        var footer = document.querySelector('.footer');
        footer.style.zIndex = 9;
        var that = this;
        that.alertShow1 = false;
        // 将改变后的价格赋值到当前

        var travelReason = this.$store.state.flight.travelReason;
        var orderForm = {travelReason};
        var searchDto = this.$store.state.flight.searchDto;
        var costCenter = this.handleCostSelectedVal;
        var expenseShow = {
          orgId:costCenter.orgId,
          corporationId:costCenter.corporationId,
          costUnitCode:costCenter.costUnitCode,
          selected:costCenter.selected
        };
        var passengerSelected = [];
        var flightForm = this.flight.flightForm;
        for (var p = 0; p < this.passengerSelected.length; p++) {
          var ob = {};
          ob.name = this.passengerSelected[p].name;
          ob.userId = this.passengerSelected[p].userId;
          ob.credentialType = this.passengerSelected[p].credentialType;
          ob.passengerType = this.passengerSelected[p].passengerType;
          ob.credentialNo = this.passengerSelected[p].credentialNo;
          ob.appIsChecked = this.passengerSelected[p].checked;
          ob.travellerType = this.passengerSelected[p].travellerType;
          ob.isPassEmpLevel = this.passengerSelected[p].isPassEmpLevel;
          ob.empLevelCode = this.passengerSelected[p].empLevelCode;
          ob.gender = this.passengerSelected[p].sexType;
          ob.birthday = this.passengerSelected[p].birthday;
          //保险的字段
          ob.insuranceIds = this.passengerSelected[p].iusuList || [];
          passengerSelected.push(ob)
        }
        orderForm.contactorDto = this.contact;
        orderForm.passengerShow = passengerSelected;
        orderForm.flightForm = JSON.parse(JSON.stringify(flightForm));
        orderForm.flightForm.flightShowDetail = null;
        orderForm.travelTypesForm = this.travelTypes[0];
        orderForm.expenseShow = expenseShow;

        orderForm.agreementPolicyId = searchDto.agreementPolicyId;
        orderForm.productType = searchDto.productType;

        //var illegalReasonListLength = this.$store.state.illegalReasonList.length;

        orderForm.searchDto = searchDto;
        this.confirmShow = false;
        that.$flight.createOrder(orderForm, function(data){
          that.$vux.loading.hide();
          var code = data.response.code || '';
          switch (code) {
            case '0':
              that.deleteDate();
              that.$store.state.pay.back = 'booking';
              that.$router.push({
                name: 'pay',
                query:{
                  orderId:data.orderId
                }
              });
              break;
            case '1':
              that.alertShow = true;
              that.alertInfo = data.response.msg;
              break;
            case '-1':
              that.alertShow = true;
              that.alertInfo = data.response.msg;
              break;
            case '5':
              /*重复订单*/
              that.confirmOneInfo = data.response.msg;
              that.confirmOneShow = true;
              break;
            case '7':
              that.createOrderCode = '7';
              that.confirmInfo = data.response.msg;
              that.confirmShow = true;
              break;
            case '005':/*未设置职级*/
              that.$store.state.staffList = '';
              that.$router.push({
                name: 'setStaffRank'
              });
              break;
            case '006':/*违规无法创建订单*/
              that.alertIllegal2 = true;
              that.alertInfo = data.response.msg;
              break;
            case '007':/*违规可以创建订单*/
              that.$store.state.illegalData = data.response.data;//展示的违规人员信息
              that.$router.push({
                name: 'illegalReason'
              });
              break;
          }
        },function(){
          that.$vux.loading.hide();
          that.$vux.toast.show({
            type: 'text',
            text: '订单创建失败,请联系管理员',
            time: 2000
          })
        });
      },
      // 售完弹窗按钮
      alertBtnClick(){
        this.alertShow = false;
        this.$router.go(-2);
      },
      deleteDate(){
        var that = this;
        for (var i = 0; i < that.$store.state.passengers.length; i++) {
          that.$store.state.passengers[i].checked = false;
        }
        var passengerSelected = this.$store.state.passengerSelected;
        for (var i = 0; i < passengerSelected.length; i++) {
          delete passengerSelected[i].iusuList;//双向绑定没问题
        }
        passengerSelected = []; //双向绑定解除
        this.$store.state.passengerSelected = [];//在执行一次赋空操作
      },
      submit () {
        this.priceDetail = false;
        if (this.contact.mobile == '') {
          this.$vux.toast.text('请填写联系人手机号');
          return
        }
        if (this.passengerSelected.length > 9) {
          this.confirmOneShow = true;
          this.confirmOneInfo = '最多选择9位乘机人';
          return;
        } else if (this.contact.mobile.checkPhone() == false) {
          this.$vux.toast.text('手机号有误');
          return
        } else if (this.contact.email && this.contact.email.checkEmail() == false) {
          this.$vux.toast.text('邮箱有误');
          return
        }
        var travelReason = this.$store.state.flight.travelReason;
        var orderForm = {travelReason};
        var passengerSelected = [];
        var that = this;
        var flight = this.$store.state.flight;
        var flightForm = this.flight.flightForm;
        var flightShowDetail = this.$store.state.flight.flightShowDetail;
        for (var p = 0; p < this.passengerSelected.length; p++) {
          var ob = {};
          ob.name = this.passengerSelected[p].name;
          ob.userId = this.passengerSelected[p].userId;
          ob.credentialType = this.passengerSelected[p].credentialType;
          ob.passengerType = this.passengerSelected[p].passengerType;
          ob.credentialNo = this.passengerSelected[p].credentialNo;
          ob.appIsChecked = this.passengerSelected[p].checked;
          ob.travellerType = this.passengerSelected[p].travellerType;
          ob.isPassEmpLevel = this.passengerSelected[p].isPassEmpLevel;
          ob.empLevelCode = this.passengerSelected[p].empLevelCode;
          ob.gender = this.passengerSelected[p].sexType;
          ob.birthday = this.passengerSelected[p].birthday;
          //保险的字段
          ob.insuranceIds = this.passengerSelected[p].iusuList || [];
          passengerSelected.push(ob)
        }
        //费用归属
        var costCenter = this.handleCostSelectedVal;
        var expenseShow = {
          orgId:costCenter.orgId,
          corporationId:costCenter.corporationId,
          costUnitCode:costCenter.costUnitCode,
          selected:costCenter.selected
        };
        if(!expenseShow.orgId || !expenseShow.corporationId || !expenseShow.costUnitCode){
          this.$vux.toast.text("无效的费用归属，请重新选择");
          return;
        }
        var searchDto = this.$store.state.flight.searchDto;
        flightForm.flightShowDetail = this.flight.flightShowDetail[this.index];
        orderForm.contactorDto = this.contact;
        orderForm.passengerShow = passengerSelected;
        orderForm.flightForm = JSON.parse(JSON.stringify(flightForm));
        orderForm.flightForm.flightShowDetail = null;
        orderForm.travelTypesForm = this.travelTypes[0];
        orderForm.expenseShow = expenseShow;

        orderForm.agreementPolicyId = searchDto.agreementPolicyId;
        orderForm.productType = searchDto.productType;

        //var illegalReasonListLength = this.$store.state.illegalReasonList.length;

        orderForm.searchDto = searchDto;
        var that = this;
        if (orderForm.passengerShow.length === 0) {
          this.$vux.toast.text("请添加乘机人")
        } else if (orderForm.contactorDto.name === '') {
          this.$vux.toast.text("请填写联系人姓名")
        } else if (orderForm.contactorDto.mobile === '' && orderForm.contactorDto.email === '') {
          this.$vux.toast.text('联系人手机和邮箱至少填写一项')
        } else {
          var checkDto = this.$store.state.flight.currentCabin; //用于创单使用
          that.$vux.loading.show({
            text: '加载中...'
          })
          that.$flight.checkPrice({
            carrierCode: checkDto.carrierCode,
            flightNo: checkDto.flightNo,

            agreementPolicyId: checkDto.agreementPolicyId,
            productType: checkDto.productType,

            departureDate: checkDto.departureDate,
            departureTime: checkDto.departureTime,

            arrivalDate: checkDto.arrivalDate,
            arrivalTime: checkDto.arrivalTime,

            fromAirport: checkDto.fromAirport,
            toAirport: checkDto.toAirport,

            fromCity: checkDto.fromCity,
            toCity: checkDto.toCity,

            routeRuleItemId: checkDto.routeRuleItemId,
            checkPriceRouteRuleItemId:searchDto.checkPriceRouteRuleItemId,
            cabinCode: checkDto.cabinCode,

            subCabinCode: checkDto.subCabinCode,
            cabinClass: checkDto.cabinClass,
            originalPrice: checkDto.facePrice
          },function(data){
            that.$vux.loading.hide();
            if (data.code === "3") {//价格变动
//              if(that.$store.state.illegalReason == true) {
                checkDto.facePrice = data.data.facePrice;
                that.$store.state.flight.facePrice = data.data.facePrice;
                that.$store.state.flight.salePrice = data.data.facePrice;
                that.confirmInfo = data.message;
                that.confirmShow = true;
                that.confirmInfoL = '重新选择航班';
                that.confirmInfoR = '确认';
                that.confirmCode = '价格变动';
                that.$vux.loading.hide();
//              }
            } else if (data.code === "-1") {
              if (!costCenter.costUnitCode) {
                this.$vux.toast.show({
                  time: 1000,
                  type: 'warn',
                  text: '请选择费用归属',
                  position: 'middle'
                })
                return
              }
              that.createdOrder();
            } else if (data.code === "4") {
              that.$vux.loading.hide();
              that.$vux.toast.text(data.message);
            } else if (data.code == '105') {
              that.$vux.loading.hide();
              that.$vux.toast.text(data.message);
            }
          },function () {
            that.$vux.loading.hide();
            that.$vux.toast.show({
              type: 'text',
              text: '订单创建失败，请联系管理员',
              time: 2000
            })
          });
        }
      },
      /*删除身份证*/
      toggleCheck(passenger, index){
        let list = this.$store.state.insurancedata.flight.flightinsurance;
        if (list.length > 0) {
          for (let i = 0; i < list.length; i++) {
            for (let j = 0; j < list[i].user_inus.length; j++) {
              if (list[i].user_inus[j].userId == passenger.userId) {
                list[i].user_inus.splice(j, 1);
              }
            }
          }
          for (let i = 0; i < list.length; i++) {
            list[i].allIusu = 0;
            for (let j = 0; j < list[i].user_inus.length; j++) {
              if (list[i].user_inus[j].flightInsu != '') {
                list[i].allIusu++;
              }
            }
          }
          //重新计算价格
          this.iusumoney_all = 0;
          for (let i = 0; i < list.length; i++) {
            if (list[i].allIusu) {
              this.iusumoney_all += list[i].salePrice * list[i].allIusu;
            }
          }
        }
        //删除时要清空
        if (passenger.iusuList && passenger.checked == true) {
          delete this.$store.state.passengers[index].iusuList
        }

        //从新计算一下
        this.$store.state.passengers[index].checked = !this.$store.state.passengers[index].checked
      },
      deletePassenger(passenger){
        this.$store.commit('DELETE_PASSENGER', passenger)
      },
      togglePrice(){
        var footer = document.querySelector('.footer');
        footer.style.zIndex = 9;
        return this.priceDetail = !this.priceDetail
      },
      /*请求证件类型与常用旅客列表*/
      update(){
        this.$router.push({
          name: 'addPassenger'
        });
      },
      popActive(index, type){
        switch (type) {
          case 1://选择出差申请
            for (var i = 0; i < this.expenseTravelType.travelTypes.length; i++) {
              this.$store.state.expenseTravelType.travelTypes[i].selected = false;
            }
            this.$store.state.expenseTravelType.travelTypes[index].selected = true;
            this.travelShow = false;
            break;
          case 2://选择费用归属
            for (var k = 0; k < this.expenseTravelType.expenseTree.length; k++) {
              this.$store.state.expenseTravelType.expenseTree[k].selected = false;
            }
            this.$store.state.expenseTravelType.expenseTree[index].selected = true;
            this.expenseShow = false;
            break;
        }
      },
    },
    computed: {
      // 处理费用归属选中后的值
      handleCostSelectedVal () {
        // 如果状态机中有选中的成本中心，则返回
        let cost_selected = this.$store.state.common.cost_selected
        if (this.costAttributionSelected.length < 1) {
          if (cost_selected.length > 0) {
            return cost_selected[cost_selected.length - 1]
          }
          let curCostId = this.$store.state.common.attribution_data.curCostId

          if (curCostId) {
            let cost = this.$store.state.common.cost_attribution.filter(item => {
              return item.costUnitCode === curCostId
            })
            return cost.length > 0 ? cost[0] : cost
          }
          return {
            name: ''
          }
        }
        return this.costAttributionSelected[this.costAttributionSelected.length - 1]
      },
      flightType(){ //      机型转换
        var flightType = '';
        if (this.flight.currentList.aircraftDto) {
          if (this.flight.currentList.aircraftDto.type) {
            var type = this.flight.currentList.aircraftDto.type;
            if (type == 3) {
              flightType = '大型机';
            } else if (type == 2) {
              flightType = '中型机';
            } else if (type == 1) {
              flightType = '小型机'
            }
          }
        }
        return flightType
      },
      bookingInit(){
        return this.$store.state.flight.bookingInit
      },
      /*上次订单乘机人*/
      recentPassengerList(){
        return this.$store.state.recentPassengerList
      },
      passengerSelected(){
        this.$store.state.passengerSelected = this.$store.state.passengers.filter(todo => todo.checked);
        return this.$store.state.passengerSelected
      },
      passengerAll(){
        return this.$store.state.passengers
      },
      flight(){
        return this.$store.state.flight
      },
      index(){
        return this.$store.state.flight.index
      },
      priceIndex(){
        return this.$store.state.flight.priceIndex
      },
      totalPrice(){

        var n = this.passengerSelected.length ? this.passengerSelected.length : 1;
        var salePrice = this.flight.salePrice;
        var departureTax = this.flight.departureTax || 0;
        var fuelTax = this.flight.fuelTax || 0;
        var serverCharge = this.flight.serverCharge;
        var total = (salePrice + fuelTax + departureTax + serverCharge) * n;

        return total
      },
      expenseTravelType(){
        return this.$store.state.expenseTravelType
      },
      expenseTree(){
        var ob = this.$store.state.expenseTravelType.expenseTree.filter(todo => todo.selected);
        return ob
      },
      travelTypes(){
        var ob = this.$store.state.expenseTravelType.travelTypes.filter(todo => todo.selected);
        return ob
      },
      contact(){
        return this.$store.state.contact
      },
      entryCode(){
        return this.$store.state.entryCode
      },
      //保险模块
      insurance_show(){
        return this.$store.state.insurancedata.flight.Insurance
      },
      iusurance_text(){
        let text = [];
        if (this.$store.state.passengerSelected.length <= 0) {
          this.$store.state.insurancedata.flight.flightinsurance = [];
        }
        let list = this.$store.state.insurancedata.flight.flightinsurance;

        for (let i = 0; i < list.length; i++) {
          for (let j = 0; j < list[i].user_inus.length; j++) {
            if (list[i].user_inus[j].flightInsu !== '' && list[i].user_inus[j].flightInsu !== undefined) {
              text.push(list[i].name);
            }
          }
        }
        text = array_heavy(text).join(',');
        return text.length <= 0 ? '请选择保险' : text;
      },
      //保险选择列表
      iusurance_list(){
        let list = this.$store.state.insurancedata.flight.flightinsurance;
        return list;
      },
      noRuleTip(){
        return this.$store.state.noRuleTip;
      }
    },
    watch: {},
  }

</script>

<style scoped>
  .right-icon {
    left: auto!important;
    right: .5rem!important;
  }
  .staffRankShow {
    width: 12.5rem;
    text-align: center;
    font-size: .75rem; /*px*/
  }
  .staffRankIco {
    margin: .375rem 0 .5rem 0;
  }
  .staffRankInfo {
    line-height: 1rem;
  }
  .staffRankBtn {
    color: #46a1bb;
    border-top: 1px solid #ccc;
    line-height: 2.5rem;
    margin-top: .5rem;
    font-size: .9rem; /*px*/
  }
  .icon-gantanhao {
    color: #46a1bb;
  }
</style>
<!--售完弹窗-->
<style scoped>
  .shouwan-alert {
    width: 15rem;
    /*height: 300px;*/
    margin-top: 1.25rem;
    font-size: .8rem; /*px*/
  }
  .shouwan-alert p {
    margin-bottom: 1rem;
    font-size: .8rem; /*px*/
  }
  .alert-btn {
    color: #46a1bb;
    border-top: 1px solid #ccc;
    line-height: 2.5rem;
    height: 2.5rem;
    font-size: .9rem; /*px*/
  }
</style>
<!--价格变动弹窗-->
<style scoped>
  .maneyChange {
    width: 15rem;
    /*height: 300px;*/
    margin-top: 1.25rem;
    font-size: .8rem; /*px*/
  }
  .maneyChange p {
    margin-bottom: 1rem;
    font-size: .8rem; /*px*/
  }
  .maneyChange .money-a-btn {
    color: #46a1bb;
    border-top: 1px solid #ccc;
    line-height: 2.5rem;
    height: 2.5rem;
    font-size: .9rem; /*px*/
  }
  .money-a-cancel {
    float: left;
    width: 50%;
    box-sizing: border-box;
    border-right: 1px solid #ccc;
  }
  .money-a-success {
    float: right;
    width: 50%;
  }
</style>

<style rel="stylesheet/scss" lang="scss" scoped>
  .mint-indicator-mask {
    z-index: 999999998;
  }
  .mint-indicator-wrapper {
    z-index: 999999999;
  }
  .mint-popup{
    border-radius: 5px;
  }
  .changePop {
    width: 92%;
    margin: 0 auto;
    max-height: 100%;
    overflow: scroll;
    padding-bottom: 10px;
    .changeTitle {
      height: 2.5rem;
      line-height: 2.5rem;
      text-align: center;
      color: #333333;
      font-size: .75rem; /*px*/
      border-bottom: 1px solid #bbbbbb; /*no*/
    }
    .changeItem {
      padding: .3rem 0;
      .changeType {
        font-size: .65rem;
        width: 100%;
        text-align: left;
        color: #666666;
        line-height: 2;
      }
      .changeTxt {
        font-size: .65rem;
        line-height: 1.5;
      }
    }
  }
  .page {
    height: 100%;
    background-color: #f0f0f0;
    padding: 2.2rem 0 2.5rem 0;
    box-sizing: border-box;
    overflow: auto;
  }
  .popItem {
    line-height: 2.5rem;
    width: 100%;
    border-bottom: 1px solid #ddd;
    font-size: .75rem; /*px*/
    box-sizing: border-box;
    padding: 0 1.2rem;
  }
  .icon-duihao {
    font-size: .9rem; /*px*/
  }
  .travelPop, .expensePop {
    width: 100%;
    max-height: 80%;
    overflow: auto;
    z-index: 3000 !important;
  }
  .activePop {
    color: #0994db;
  }
  .addP {
    margin: 0 auto;
    box-sizing: border-box;
    position: relative;
    width: 97.33%;
    height: 3.25rem;
    padding: .9rem .5rem 0 .5rem;
    background-color: #fff;
  }
  .addL {
    position: relative;
    float: left;
    text-align: left;
    h2 {
      font-size: .75rem; /*px*/
      color: #333333;
      margin-bottom: .25rem;
    }
    p {
      font-size: .55rem; /*px*/
      color: #999999;
    }
  }
  .addR {
    text-align: center;
    position: relative;
    float: right;
    border-radius: .125rem;
    font-size: .75rem; /*px*/
    color: white;
    background-color: #46a1bb;
    width: 4.65rem;
    height: 1.6rem;
    line-height: 1.6rem;
  }
  .line {
    height: 1px;
    width: 92%;
    margin: 1px auto;
  }
  .lineP {
    height: 1px; /*px*/
    background-color: #999999;
  }
  .peopleList {
    max-height: 80%;
    overflow: auto;
    .name {
      margin-left: 0!important;
    }
  }
  .PInfo-cur {
    width: 97.33%;
  }
  .PInfo {
    box-sizing: border-box;
    background-color: #fff;
    margin:  0 auto;
    position: relative;
    padding: 0 .5rem;
    font-size: 0;
    text-align: left;
    border-bottom: 1px solid #eee; /*no*/
    .name {
      margin-left: 1rem;
      height: 3rem;
      margin-right: .5rem;
      font-size: .75rem; /*px*/
      display: block;
      float: left;
      line-height: 3rem;
    }
    .name.ell {
      margin-left: 1.5rem;
    }
    .card {
      height: 3rem;
      font-size: .75rem; /*px*/
      display: block;
      float: left;
      line-height: 3rem;
      vertical-align: top;
      margin-right: .5rem;
    }
    .cardID {
      height: 3rem;
      font-size: .75rem; /*px*/
      display: inline-block;
      line-height: 3rem;
      margin-right: .5rem;

    }
    i.icon-shanchu3{
      display: inline-block;
      position: absolute;
      padding-left: .5rem;
      left: 0;
      height: 3rem;
      line-height: 3rem;
      font-size: .75rem; /*px*/
      color: #ce1b1b;
    }
    i.icon-icon-1{
      padding: 0 .5rem 0 1rem;
      display: inline-block;
      position: absolute;
      right: 0;
      height: 3rem;
      line-height: 3rem;
      font-size: 1.5rem; /*px*/
      color: #46a1bb;
    }
    .check {
      display: inline-block;
      float: left;
      vertical-align: top;
      font-size: .8rem; /*px*/
      width: .8rem; /*px*/
      height: .8rem; /*px*/
      border: 1px solid #999999;
      margin: 1.05rem .25rem 0 0;
      border-radius: 0;
    }
    .icon-duihao {
      color: #46a1bb;
    }
  }
  .contact {
    margin: 0 .25rem .5rem .25rem;
    border-radius: .125rem;
  }
  .addPpopup {
    min-height: .5rem;
    width: 100%;
    background-color: white;
    z-index: 3000 !important;
    .titleP {
      box-sizing: border-box;
      padding: 0 .6rem;
      /*background-color: #999999;*/
      font-size: .8rem; /*px*/
      color: #333333;
      .cancel {
        position: relative;
        float: left;
        height: 2.35rem;
        line-height: 2.35rem;
      }
      .sure {
        position: relative;
        float: right;
        height: 2.35rem;
        line-height: 2.35rem;
      }
    }
    .add {
      box-sizing: border-box;
      position: relative;
      margin: .5rem 0 1rem 0;
      padding: 0 .6rem;
      font-size: .75rem; /*px*/
      color: white;
      .add1 {
        background-color: #46a1bb;
        position: relative;
        float: left;
        text-align: center;
        height: 2.1rem;
        line-height: 2.1rem;
        width: 48%;
        border-radius: .125rem;
      }
      .add2 {
        background-color: #46a1bb;
        position: relative;
        float: right;
        text-align: center;
        height: 2.1rem;
        line-height: 2.1rem;
        width: 48%;
        border-radius: .125rem;
      }
    }
  }
  .priceDetail {
    padding-bottom: 2.5rem;
    width: 100%;
    .space {
      height: 2.5rem;
      line-height: 2.5rem;
      padding: 0 .5rem;
      color: #333333;
      font-size: .75rem;
      font-weight: bold;
      .cangwei {
        margin-left: .125rem;
      }
    }
    .price, .insurance {
      padding: .5rem .5rem 0 .5rem;
      p {
        margin-bottom: .5rem;
        .type {
          color: #333333;
          font-size: .75rem;
          width: 5rem;
          display: inline-block;
        }
        .unit {
          color: #ce1b1b;
          font-size: .75rem;
          margin-left: 1.5rem;
          display: inline-block;
          width: 4rem;
        }
        .count {
          color: #ce1b1b;
          font-size: .75rem;
          margin-left: .75rem;
        }
      }
    }
  }
  .labelChange {
    background-color: #fff;
    padding: 0 .75rem;
    font-size: .75rem;
    text-align: right;
    height: 2rem;
    line-height: 2rem;
    color: #46a1bb;
    margin-top: .125rem;
  }
  .label {
    text-align: left;
    background-color: white;
    padding: 0 .5rem;
    font-size: 0;
    position: relative;
    span {
      display: block;
      font-size: .75rem;
      width: 3.5rem;
      height: 2.65rem;
      line-height: 2.65rem;
      color: #333333;
      float: left;
    }
    .input {
      text-indent: .5rem;
      display: block;
      width: 9.5rem;
      font-size: .75rem;
      border: none;
      height: 2.65rem;
      float: left;
      line-height: 2.65rem;
    }
    i {
      position: absolute;
      right: .5rem;
      font-size: .8rem;
      color: #46a1bb;
      height: 2.65rem;
      line-height: 2.65rem;
    }
    div {
      position: relative;
      display: inline-block;
    }
  }
  .accountPay {
    font-size: .75rem;
    color: #333333;
    display: inline-block;
    height: 2.65rem;
    line-height: 2.65rem;
  }
  input.accountI {
    position: absolute;
    right: .5rem;
    top: .85rem;
    font-size: .8rem;
    width: .8rem;
    height: .8rem;
    border: 1px solid #eee;
    margin: 0;
    border-radius: 0;
  }
  .footer {
    width: 100%;
    z-index: 9;
    .footerL {
      background-color: white;
      width: 50%;
      position: relative;
      float: left;
      box-sizing: border-box;
      padding: 0 1rem;
      .price {
        position: relative;
        float: left;
        color: #ce1b1b;
        font-size: .85rem;
        height: 2.5rem;
        line-height: 2.5rem;
      }
      .priceD {
        position: relative;
        float: right;
        font-size: .55rem;
        height: 2.5rem;
        line-height: 2.5rem;
        color: #999999;
      }
      .icon-unfold {
        vertical-align: sub;
      }

    }
    .footerR {
      width: 50%;
      position: relative;
      float: left;
      color: white;
      font-size: .9rem; /*px*/
      height: 2.5rem;
      line-height: 2.5rem;
      text-align: center;
      background-color: #46a1bb;
    }
  }
  /*title*/
  .title {
    text-align: center;
    background-color: #fff;
    width: 97.33%;
    margin: 0 .25rem .25rem .25rem;
    border-radius: .125rem;
    font-size: .75rem;
    line-height: 2.5rem;
  }
  .titleDate {
    font-size: .75rem; /*px*/
    text-align: left;
    padding: .65rem .5rem;
  }
  .title1 {
    line-height: 1.5rem;
    font-size: 1.15rem; /*px*/
  }
  .title1 p {
    float: left;
  }
  .title2 {
    line-height: 1.25rem;
    font-size: .6rem; /*px*/
  }
  .title3 {
    line-height: 1.25rem;
    font-size: .6rem; /*px*/
  }
  .titleGoDate {
    width: 4.5rem;
    margin-left: 1.5rem;
  }
  .titleBackDate {
    width: 4.5rem;
  }
  .titleLineMiddle {
    width: 6.25rem;
    height: 1.5rem;
    background: url("../../../assets/images/goBackLine.png") no-repeat center;
  }
  .titleGoCity {
    width: 6.5rem;
    float: left;
    margin-left: .5rem;
  }
  .titleBackCity {
    width: 6.5rem;
    float: right;
    margin-right: .5rem;
  }
  .titleGoType {
    width: 7rem;
    float: left;
    margin-left: .25rem;
  }
  .titleLineInfo {
    float: left;
    width: 3.75rem;
  }
  .titleBackType {
    width: 7rem;
    float: right;
    margin-right: .25rem;
  }
  .iusurance {
    font-size: .75rem;
    border-top: 1px solid #d4d4d4; /*no*/
    padding: 0 .5rem;
  }
  .iusu-heda {
    line-height: 2rem;
  }
  .iusu-list {
    line-height: 2rem;
    display: flex;
  }
  .iusu-list p {
    flex: 1;
  }
  .iusu-list p:last-child {
    text-align: center;
    color: #ce1b1b;
  }

  .datebug {
    width: 0;
    height: 0;
    font-size: 0;
  }
  .res{
    width: 75% !important;
    overflow: hidden;
    text-overflow:ellipsis;
    white-space: nowrap;
    color: #333333;
  }
</style>
